package actions.manager;

import veilingDomein.User;
import veilingService.IUserService;
import veilingService.ServiceProvider;

import com.opensymphony.xwork2.ActionSupport;

public class UpdateUserForm extends ActionSupport {

	private IUserService ius = ServiceProvider.getUserService();
	private User user;
	private String naam;
	private String adres;
	private String woonplaats;
	private String username;
	private String password;
	private String email;
	private String passwordRepeat;


	public String execute() {
		user = ius.getUser(username);
		System.out.println("opgehaald: " + user);
		return SUCCESS;
	}

	public void validate() {
		//				user = ivs.getUser(username);
		//				username = user.getUsername();
		//				password = user.getPassword();
		//				naam = user.getNaam();
		//				adres = user.getAdres();
		//				woonplaats = user.getWoonplaats();
		//				email = user.getEmail();


	}
	//		public ArrayList<User>getUsers() {
	//			return users;
	//		}
	public User getUser() {
		return user;
	}

	public String getNaam() {
		return naam;
	}

	public void setNaam(String naam) {
		this.naam = naam;
	}

	public String getAdres() {
		return adres;
	}

	public void setAdres(String adres) {
		this.adres = adres;
	}

	public String getWoonplaats() {
		return woonplaats;
	}

	public void setWoonplaats(String woonplaats) {
		this.woonplaats = woonplaats;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPasswordRepeat() {
		return passwordRepeat;
	}

	public void setPasswordRepeat(String passwordRepeat) {
		this.passwordRepeat = passwordRepeat;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}


}

